package com.fifth.commodity.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @作者：刘壬杉
 * @创建时间 2022/9/8 19:15
 **/
@FeignClient(value = "mrcai-order")
public interface OrderFeign {
    @PostMapping("api/order/getGoodsSellNum/{goodsid}")
    public Integer getGoodsSellNum(@PathVariable String goodsid);

    @PostMapping("api/stock/updateStock/{id}/{sellnum}/{totalnum}")
    void updateStock(@PathVariable Integer id,@PathVariable Integer sellnum,@PathVariable Integer totalnum);

    @PostMapping("api/stock/addStock/{id}/{totalnum}/{price}")
    void addStock(@PathVariable Integer id,@PathVariable  Integer totalnum,@PathVariable  Integer price);
}
